//
//  SettingTableViewCell.swift
//  ShareUmbrella
//
//  Created by keng fu on 2017/8/22.
//  Copyright © 2017年 尧尚信息科技. All rights reserved.
//

import UIKit
import YSKit

class SettingTableViewCell: YSBaseTableViewCell {
    
    var lblTitle = UILabel()
    
    var imgArrow = UIImageView()
    
    var line = UIImageView()
        
    override func setup() {
        super.setup()
        // Initialization code
        
        self.backgroundColor = UIColor.clear
        
        lblTitle.ys.customize { (view) in
            view.font = UIFont.systemFont(ofSize: 15.0)
            view.textColor = .gray
            self.addSubview(view)
            view.snp.makeConstraints({ (make) in
                make.centerY.equalTo(self.snp.centerY)
                make.leading.equalTo(self.snp.leading).offset(15)
            })
        }
        
        imgArrow.ys.customize { (view) in
            self.addSubview(view)
            view.image = UIImage(named: "箭头2")
            view.snp.makeConstraints({ (make) in
                make.trailing.equalTo(self.snp.trailing).offset(-15)
                make.centerY.equalTo(self.snp.centerY)
            })
        }
        
        line.ys.customize { (view) in
            self.addSubview(view)
            view.image = UIImage(named: "绿线")
            view.snp.makeConstraints({ (make) in
                make.bottom.equalTo(self)
                make.leading.equalTo(lblTitle.snp.leading)
                make.trailing.equalTo(imgArrow.snp.trailing)
                make.height.equalTo(1)
            })
        }
        
       
    }
    
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
        
        // Configure the view for the selected state
    }
    
    func updateUI(title: String){
        lblTitle.text = title
    }
}
